package dao.pojo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "translate", catalog = "makeiteasy")
public class Translate implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;
	private Integer translateId;
	private String translateDirection;
	private String translateTitle;
	private String translateKey;
	private Set<Test> tests = new HashSet<Test>(0);

	// Constructors

	/** default constructor */
	public Translate() {
	}

	/** full constructor */
	public Translate(String translateDirection, String translateTitle,
			String translateKey, Set<Test> tests) {
		this.translateDirection = translateDirection;
		this.translateTitle = translateTitle;
		this.translateKey = translateKey;
		this.tests = tests;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "translateId", unique = true, nullable = false)
	public Integer getTranslateId() {
		return this.translateId;
	}

	public void setTranslateId(Integer translateId) {
		this.translateId = translateId;
	}

	@Column(name = "translateDirection", length = 128)
	public String getTranslateDirection() {
		return this.translateDirection;
	}

	public void setTranslateDirection(String translateDirection) {
		this.translateDirection = translateDirection;
	}

	@Column(name = "translateTitle", length = 2048)
	public String getTranslateTitle() {
		return this.translateTitle;
	}

	public void setTranslateTitle(String translateTitle) {
		this.translateTitle = translateTitle;
	}

	@Column(name = "translateKey", length = 512)
	public String getTranslateKey() {
		return this.translateKey;
	}

	public void setTranslateKey(String translateKey) {
		this.translateKey = translateKey;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "translate")
	public Set<Test> getTests() {
		return this.tests;
	}

	public void setTests(Set<Test> tests) {
		this.tests = tests;
	}

}